﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ForumMaster.Master" AutoEventWireup="true"
    CodeBehind="AddForumGroup.aspx.cs" Inherits="FilStartUps.Admin.AddForumGroup" %>
    <%@ Register Src="../Controls/FilStartUps_PageNav.ascx" TagName="FilStartUps_PageNav"
    TagPrefix="uc1" %>
<asp:Content ID="Nav" ContentPlaceHolderID="MainNav" runat="server">
    <uc1:FilStartUps_PageNav ID="FilStartUps_PageNav1" runat="server" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentForumDisplay" runat="server">
    <asp:ScriptManager ID="sm" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:DataGrid ID="dgforumgrouplist" OnUpdateCommand="dgforumgrouplist_Update" OnCancelCommand="dgforumgrouplist_Cancel"
                OnEditCommand="dgforumgrouplist_EditCommand" PageSize="5" CellPadding="11" BorderColor="Silver"
                AllowPaging="true" AutoGenerateColumns="false" runat="server" OnPageIndexChanged="dgforumgrouplist_Paging">
                <AlternatingItemStyle BackColor="Lavender" />
                <PagerStyle Mode="NumericPages" HorizontalAlign="Left" />
                <Columns>
                    <asp:BoundColumn ReadOnly="true" DataField="forumgroupidPK" HeaderText="Forum GroupID" />
                    <asp:TemplateColumn HeaderText="GroupName" ItemStyle-Width="100%">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lbgroupname" Text='<%# DataBinder.Eval(Container.DataItem, "forumgroupname") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:Label runat="server" ID="lbforumgroupid" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "forumgroupidPK") %>'></asp:Label>
                            <asp:TextBox runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "forumgroupname") %>'
                                MaxLength="50" ID="txtforumgroupname"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                                ErrorMessage="*" ForeColor="Red" ControlToValidate="txtforumgroupname"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                    </asp:TemplateColumn>
                    <asp:EditCommandColumn CancelText="Cancel" EditText="Edit" UpdateText="Update" HeaderText="Option"></asp:EditCommandColumn>
                </Columns>
            </asp:DataGrid>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btncreategroup" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <h1>
        Forum Group
    </h1>
    <table width="100%">
        <tr>
            <td>
                Forum Group Name:
                <asp:TextBox runat="server" ID="txtforumgroupname" Width="350px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Button runat="server" Text="Create" ID="btncreategroup" CausesValidation="False"
                    OnClick="btncreategroup_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
